package com.xaiojimao.gr_common.vo.req;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.util.Objects;

@Data
public class PageReq<T> {

    @Min(0)
    @Max(30)
    private Integer pageSize = 30;

    private Integer pageNo = 1;

    /**
     * 获取mybatisPlus的page
     *
     * @return
     */
    public Page<T> getPage() {
        return new Page<T>(pageNo, pageSize);
    }

}
